#ifndef _VS_OBJECT_H
#define _VS_OBJECT_H

#include "Shape.h"
#include "Point3D.h"
#include <gl\glut.h>

class VSObject
{
public:
	VSObject(void);
	VSObject(float x=0,float y=0,float z=0,float l=1,float w=1,float h=1,GLfloat rotateAngle = 0,Point3D rotateAxis = Point3D(0,0,0));
	~VSObject(void);
	void render();

public:
	void Move(Point3D direction);
	void Scale(Point3D direction);
	void Rotate(Point3D moves1p1,Point3D moves1p2,Point3D moves2p1,Point3D moves2p2);
	void Rotate(Point3D axis,double angle);
	void setX(float x);
	void setY(float y);
	void setZ(float z);
	void setL(float l);
	void setW(float w);
	void setH(float h);
	void setRotate(GLfloat rotateAngle,Point3D rotateAxis);
	void setShape(int shape,int mode = Shape::WIRE);
	float h(){return m_h;}
	float l(){return m_l;}
	float w(){return m_w;}

private:
	Shape m_shape;
	float m_x;
	float m_y;
	float m_z;
	float m_l;
	float m_w;
	float m_h;
	GLfloat m_rotateAngle;
	//int m_rotateAxis;
	Point3D m_rotateAxis;
	void angle(Point3D pt1, Point3D pt2 );

public:
	GLint    viewport[4]; 
	GLdouble modelview[16]; 
	GLdouble projection[16]; 

};

#endif